import { request } from "@/utils/service"
import { getToken } from "@/utils/cache/cookies"
/**ZS Boolean true 为5G号卡 ，false 为 云尚号卡 */
/** 增 */
export function createComboDataApi(data: any) {
  return request({
    url: "/order/stock/add",
    method: "post",
    data
  })
}

/** 删 */
export function deleteComboDataApi(id: any) {
  return request({
    url: "/order/stock/del",
    method: "delete",
    params: {
      id
    }
  })
}

/** 改 */
export function updateComboDataApi(data: any) {
  return request({
    url: "/order/stock/update",
    method: "put",
    data
  })
}

/** 查 */
export function getComboDataApi(params: any) {
  return request<any>({
    url: "/order/stock/query",
    method: "get",
    params
  })
}
/** 存量订单查id返回名字 */
export function getComboDataSApi() {
  return request<any>({
    url: "/order/stock/querytaock",
    method: "get"
  })
}
// 查报备套餐id
export function getreportIdListApi() {
  return request<any>({
    url: "/order/stock/queryByReport",
    method: "get"
  })
}
/**图片上传 */
export function uploadComboImageList(data: any) {
  return request({
    url: "order/package/upload",
    method: "post",
    headers: {
      "Content-Type": "multipart/form-data",
      token: getToken()
    },
    data
  })
}
/**图片上传 压缩*/
export function uploadComboImageListMin(data: any) {
  return request({
    url: "/order/stock/upload",
    method: "post",
    headers: {
      "Content-Type": "multipart/form-data",
      token: getToken()
    },
    data
  })
}
